ccR.Add_Rotation(
	1,
	"Ankhys_BASIC_Balance_Druid",
	"BASIC Rotation\n\nMade by Ankhy"
)

function Ankhys_BASIC_Balance_Druid()

	local direction = GetEclipseDirection()

	if (ccR.Player.IsInCombat() or (ccR.Player.IsInGroup() and ccR.Target.IsInCombat())) and ccR.Target.Is.Attackable() then

		if ccR.Player.Enemies() >= 3 then
			if ccR.Spell.IsReady("Starfall") then ccR.Cast.Spell("Starfall") end
		end
		if ccR.Player.IsMoving() and ccR.Spell.Is.Ready("Moonfire") then ccR.Cast.Attack("Moonfire") end
		if ccR.Player.IsMoving() and ccR.Spell.Is.Ready("Sunfire") then ccR.Cast.Attack("Sunfire") end
		if ccR.Player.HasTalent("Euphoria") and ccR.Spell.Is.Ready(MOONFIRE) and ccR.Player.HasBuff("Lunar Peak") and (ccR.Target.MyDebuffDuration("Moonfire", "<=", 15) or not ccR.Target.HasMyDebuff("Moonfire")) then ccR.Cast.Attack(MOONFIRE)  end
		if not ccR.Player.HasTalent("Euphoria") and ccR.Spell.Is.Ready(MOONFIRE) and (not ccR.Target.HasMyDebuff("Moonfire") or ccR.Target.MyDebuffDuration("Moonfire", "<=", 3)) then ccR.Cast.Attack(MOONFIRE)  end
		if ccR.Player.HasTalent("Euphoria") and ccR.Spell.Is.Ready(SUNFIRE) and (ccR.Target.MyDebuffDuration("Sunfire", "<=", 15) or not ccR.Target.HasMyDebuff("Sunfire")) and ccR.Player.HasBuff("Solar Peak")  then ccR.Cast.Attack(SUNFIRE)  end
		if not ccR.Player.HasTalent("Euphoria") and ccR.Spell.Is.Ready(SUNFIRE) and (not ccR.Target.HasMyDebuff("Sunfire") or ccR.Target.MyDebuffDuration("Sunfire", "<=", 3)) then ccR.Cast.Attack(SUNFIRE)  end
		if ccR.Spell.Is.Ready("Stellar Flare") and (ccR.Target.MyDebuffDuration("Stellar Flare", "<=", 4) or not ccR.Target.HasMyDebuff("Stellar Flare")) then ccR.Cast.Mass.Debuff("Stellar Flare") end
		if ccR.Player.Enemies() <= 2 and (ccR.Spell.Charges("Starsurge") >= 1 and not ccR.Player.HasBuff("Lunar Empowerment") and ccR.Player.Is.Lunar() or ccR.Spell.Charges("Starsurge") == 3 ) then ccR.Cast.Attack("Starsurge") end
		if ccR.Player.Enemies() <= 2 and (ccR.Spell.Charges("Starsurge") >= 1 and not ccR.Player.HasBuff("Solar Empowerment") and ccR.Player.Is.Solar() or ccR.Spell.Charges("Starsurge") == 3 ) then ccR.Cast.Attack("Starsurge") end
		if ccR.Player.HasBuff("Celestial Alignment") and not ccR.Player.IsMoving() then ccR.Cast.Attack("Starfire")  end
		if ccR.Player.Is.Solar() and (not ccR.Player.IsMoving() or ccR.Player.HasBuff("Empowered Moonkin")) then ccR.Cast.Attack("Wrath")  
		elseif ccR.Player.Is.Lunar() and (not ccR.Player.IsMoving() or ccR.Player.HasBuff("Empowered Moonkin")) then ccR.Cast.Attack("Starfire")  end 	
	end	
end